package com.Excrises.ten;

import java.io.*;

public class one {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\ideaFile\\read.txt");
        File file1 = new File("D:\\ideaFile\\Out.txt");
        FileWriter fileWriter = new FileWriter(file1);
        BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
        FileReader fr = new FileReader(file);
        BufferedReader br = new BufferedReader(fr);

        String a = null;


        while ((a =  br.readLine()) != null){
            System.out.println(a);
            bufferedWriter.write(a);


        }
        bufferedWriter.flush();
        br.close();

    }
}
